SEMA block

Short summary

Name

SEMA

→POU type

→function block

Category

IEC-block, BistableEnh

Conform to →IEC-standard

(plus) not defined in IEC-standard

Graphical interface

Available since

version 1.27.0 (for Neuron Power Engineer)

Functionality

The block represents a semaphore.

If input CLAIM is →turned on, output BUSY returns value TRUE (or an equivalent) starting with the next executed cycle. If input RELEASE is turned on, output BUSY returns value FALSE (or an equivalent).

In-/outputs

 

Identifier

→Data type

Description

Inputs:

CLAIM

BOOL

set (dominant)

RELEASE

BOOL

reset

Outputs:

BUSY

BOOL

 

Input EN and output ENO are available when →calling the block. See "Execution control: EN, ENO" for information on input EN and output ENO.

See:

Example for usage within ST-editor

PROGRAM Test
   VAR
      mySEMA   : SEMA;
      TriggerC : BOOL;
      TriggerR : BOOL;
      Out      : BOOL;
   END_VAR
   mySEMA(CLAIM := TriggerC, RELEASE := TriggerR, BUSY => Out);
   (* Instance of block 'SEMA' is called. *)
   (* Input 'CLAIM' gets value from 'TriggerC' variable. Input 'RELEASE' gets value from 'TriggerR' variable.*)
   (* Output 'BUSY' returns TRUE, if 'TriggerC' is TRUE. Output 'BUSY' returns FALSE, if 'TriggerR' is TRUE and 'TriggerC' is FALSE. *)
   (* Variable 'Out' accesses the output 'BUSY'. *)
END_PROGRAM

When creating your application within the ST-editor, enter a call of a block by typing the text as requested by the syntax or use Content Assist.